﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SISCON.Model
{
    public class Course
    {

        private long _CourseId;
        private string _CourseCode;
        private string _CourseNumber;
        private string _CourseName;
        private bool _IsActive;
        private List<Teacher> _Teachers;
        private List<Schedule> _Schedules;

        public long CourseId
        {
            get { return _CourseId; }
            set { _CourseId = value; }
        }

        public string CourseCode
        {
            get { return _CourseCode; }
            set { _CourseCode = value; }
        }

        public string CourseNumber
        {
            get { return _CourseNumber; }
            set { _CourseNumber = value; }
        }

        public string CourseName
        {
            get { return _CourseName; }
            set { _CourseName = value; }
        }

        public List<Teacher> Teachers
        {
            get { return _Teachers; }
            set { _Teachers = value; }
        }

        public bool IsActive
        {
            get { return _IsActive; }
            set { _IsActive = value; }
        }

        public List<Schedule> Schedules
        {
            get { return _Schedules; }
            set { _Schedules = value; }
        }

        public bool HasSchedule
        {
            get { return _Schedules != null && _Schedules.Count > 0 && _Schedules[0].ScheduleId > 0; }
            set { }
        }

        public bool HasTeacher
        {
            get { return _Teachers != null && _Teachers.Count > 0 && _Teachers[0].TeacherId > 0; }
            set { }
        }
    }
}